var Cache = require('cache-swap');
var utils = require('gulp-plugins-dcv');
var fileCache, cacheDirName = 'requirejs', distPath, zipPath;
if (utils.util.isWindows()) { //windows版本
  fileCache = new Cache({
    'cacheDirName': cacheDirName,
    'tmpDir': 'C:\\Documents\\gulp-cache'
  });
  distPath = 'dist';
  // distPath = "../dcv-web/dcvWeb";//必须是相对路径，一般为dist
  // distPath = "../../vue/dcv-web/dcvWeb";
  zipPath = './zip';
} else {
  fileCache = new Cache({
    'cacheDirName': cacheDirName,
    'tmpDir': '../gulp-cache'
  });
  distPath = 'dist';
  zipPath = '/tmp/';
}

var defaultOptions = {
  'fileCache': fileCache,
  'defaultMaxListeners': 30,
  'isMap': false, //是否压缩源码的map
  'dirs': {
    'map': '../map', //源码map文件地址
    'dev': 'src',
    'entryHtml': 'src/entry/*.html',
    'dist': distPath, //必须是相对路径，一般为dist
    'zip': './zip',
    'zipName': 'require',
    'unInDirs': [

    ]
  },
  'htmlMinOptions': {
    'removeComments': true, //清除HTML注释
    'collapseWhitespace': true, //压缩HTML
    'collapseBooleanAttributes': true, //省略布尔属性的值 <input checked="true"/> ==> <input />
    'removeEmptyAttributes': true, //删除所有空格作属性值 <input id="" /> ==> <input />
    'removeScriptTypeAttributes': true, //删除<script>的type="text/javascript"
    'removeStyleLinkTypeAttributes': true, //删除<style>和<link>的type="text/css"
    'minifyJS': true, //压缩页面JS
    'minifyCSS': {
      rebase: false //clean-css升级，默认会修改相对路径
    } //压缩页面CSS
  },
  'imageMinOptions': {
    optimizationLevel: 5, //类型：Number  默认：3  取值范围：0-7（优化等级）
    progressive: true, //类型：Boolean 默认：false 无损压缩jpg图片
    interlaced: true, //类型：Boolean 默认：false 隔行扫描gif进行渲染
    multipass: false //类型：Boolean 默认：false 多次优化svg直到完全优化
  }
};
module.exports = defaultOptions;
